<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;
use Carbon\Carbon;

class ShortUrl extends Model
{
	use HasDateTimeFormatter;
    protected $table = 'short_urls';

    protected $fillable = [
        'agent_id',
        'link',
        'url',
        'key',
        'password',
        'state',
        'out_video'
    ];

    public function getOutVideoAttribute($value){
        return xor_enc($value);
    }

    public function setOutVideoAttribute($value){
        $this->attributes['out_video'] = xor_enc($value);
    }
}
